;
(function () {
  'use strict';
  angular.module('controllers.analysisSysOM.tps', [])
    .controller('tpsController', tpsController);

  function tpsController($scope, tpsService, CoreService, $rootScope) {
    $scope.pageInfo = tpsService;
    var spans = ['/maxTps', '/avgTps'];
    $scope.selectedIndex = CoreService.navgit(spans);
    $rootScope.$on('$stateChangeSuccess', function (event, state) {
      $scope.selectedIndex = spans.indexOf(state.url);
    });
  }

  tpsController.$inject = ['$scope', 'tpsService', 'CoreService', '$rootScope'];
})();